home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / gengui2.lha / GenGui2 / Examples / subgui.gui < prev    next >
Text File  |  1995-02-16  |  991b  |  51 lines

  1.  
  2. #c_source
  3.  
  4. #include <stdio.h>
  5.  
  6. int SubPrint(struct WinInfo *winfo,
  7.                      struct NewGadget *ng,
  8.                      struct GadInfo *gad,
  9.                      int left, int top, int width, int height)
  10. {
  11.  
  12.    const char *modes[]={"MODE_NEW","MODE_RESIZE","MODE_REFRESH","MODE_STOP",
  13.                        "MODE_FREE","MODE_BACKUP","MODE_RESTORE"};
  14.  
  15.    printf("Mode: %s\n"
  16.           "Render: %s\n"
  17.           "Left: %d\n"
  18.           "Top: %d\n"
  19.           "Width: %d\n"
  20.           "Height: %d\n\n",modes[winfo->Mode],winfo->Render?"TRUE":"FALSE",
  21.                          left,top,width,height);
  22.  
  23.    return(0);
  24. }
  25.  
  26. #end_source
  27.  
  28. projectname TestPro
  29. vbox
  30.    plaintext
  31.       Text "This program prints every\n"
  32.       Text "call of the customfunction\n"
  33.       Text "to stdout including the mode\n"
  34.       Text "with which it was called"
  35.       FLAGS GG_HCentered,GG_VCentered
  36.    end
  37.    vbox
  38.       frame raised
  39.       custom
  40.          custom SubPrint
  41.          id 11
  42.       end
  43.    end
  44. end
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.